﻿@model Echegoyen.Models.Ejemplar

@{
    ViewBag.Title = "Nuevo ejemplar";
}

<h2>Nuevo ejemplar</h2>

@using (Html.BeginForm()) {
    @Html.AntiForgeryToken()
    @Html.ValidationSummary(true)

    <fieldset>
        <legend>Ejemplar</legend>

        <div class="editor-label">
            @Html.LabelFor(model => model.Material)
        </div>
        <div class="editor-field">
            @Html.DropDownListFor(model => model.MaterialId, 
                 (IEnumerable<SelectListItem>)@ViewBag.Materiales)
            @Html.ValidationMessageFor(model => model.Material)        
        </div>
        <p>
            <input type="submit" value="Crear" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Volver", "Index")
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
